package cn.com.roy.thread.t4_1_11.lockmethdtest1;

import java.util.concurrent.locks.ReentrantLock;

public class MyService {
    public  ReentrantLock lock = new ReentrantLock();
    public void waitMethod(){
        try {
            lock.lock();
            Thread.sleep(Integer.MAX_VALUE);
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            lock.unlock();
        }

    }


}
